import AppLayout from '@/core/components/layouts/AppLayout'
import BasicLayout from '@/core/components/layouts/BasicLayout'
import DesktopView from '@/core/components/views/DesktopView'
import MobileView from '@/core/components/views/MobileView'
import IsAuth from '@/lib/auth/components/IsAuth'
import TransactionComponent from '@/lib/transaction/components/Transaction'
import { useRouter } from 'next/router'

export default function Transaction() {
  const router = useRouter()

  return (
    <IsAuth>
      <MobileView>
        <AppLayout title='Transaksi'>
          <TransactionComponent id={router.query.id} />
        </AppLayout>
      </MobileView>

      <DesktopView>
        <BasicLayout>
          <TransactionComponent id={router.query.id} />
        </BasicLayout>
      </DesktopView>
    </IsAuth>
  )
}
